package com.frank.oj.service.entity.problem;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.frank.model.entity.problem.Problem;
import com.frank.oj.common.exception.StatusFailException;
import com.frank.oj.model.dto.ProblemDTO;
import com.frank.oj.model.vo.ImportProblemVO;
import com.frank.oj.model.vo.ProblemVO;

import java.util.HashMap;
import java.util.List;

/**
 * @author frank
 * @Date 2024/1/25
 */
public interface ProblemEntityService extends IService<Problem> {
    Page<ProblemVO> getProblemList(int limit, int currentPage, Long pid, String title,
                                   Integer difficulty, List<Long> tid, String oj);

    boolean adminAddProblem(ProblemDTO problemDTO);

    boolean adminUpdateProblem(ProblemDTO problemDTO) throws StatusFailException;

    ImportProblemVO buildExportProblem(Long pid, List<HashMap<String, Object>> problemCases, HashMap<Long, String> languageMap, HashMap<Long, String> tagMap);
}
